<html>
<head><meta charset="utf-8"><title>bootstrap fails to build?? · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html">bootstrap fails to build??</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="234861399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234861399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234861399">(Apr 16 2021 at 14:22)</a>:</h4>
<p>anyone run into this lately?</p>
<div class="codehilite"><pre><span></span><code>&gt; ./x.py --help
info: Downloading and building bootstrap before processing --help
      command. See src/bootstrap/README.md for help with common
      commands.
Updating only changed submodules
Submodules updated in 0.02 seconds
   Compiling proc-macro-error v1.0.4
   Compiling serde v1.0.125
thread &#39;rustc&#39; panicked at &#39;Failed to get crate data for crate21&#39;, compiler/rustc_metadata/src/creader.rs:136:32
</code></pre></div>



<a name="234861522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234861522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234861522">(Apr 16 2021 at 14:22)</a>:</h4>
<p>I tried <code>rm -r build/bootstrap</code> without success so I don't think it's related to incremental</p>



<a name="234861965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234861965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234861965">(Apr 16 2021 at 14:25)</a>:</h4>
<p>If I rerun it I also get an additional error</p>
<div class="codehilite"><pre><span></span><code>error: /nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/libc.so.6: version `GLIBC_2.32&#39; not found (required by /home/joshua/rust/build/bootstrap/debug/deps/libserde_derive-f9ff83edb8ad35f4.so)
   --&gt; /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.125/src/lib.rs:293:1
    |
293 | extern crate serde_derive;
</code></pre></div>



<a name="234862002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862002">(Apr 16 2021 at 14:25)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> <span class="user-mention" data-user-id="124288">@oli</span> you use nix, right, does this look familiar?</p>



<a name="234862163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862163">(Apr 16 2021 at 14:26)</a>:</h4>
<p>I've only used it with <code>download-llvm</code>, is this downloading rustc itself, or something?</p>



<a name="234862192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862192">(Apr 16 2021 at 14:26)</a>:</h4>
<p>this is building bootstrap itself</p>



<a name="234862224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862224">(Apr 16 2021 at 14:26)</a>:</h4>
<p>download-llvm is unrelated, it hasn't even gotten far enough to parse the option</p>



<a name="234862232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862232">(Apr 16 2021 at 14:26)</a>:</h4>
<p>The error is basically saying that there's a binary that requires glibc 2.32, but a libc from glibc 2.30 is used.</p>



<a name="234862296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862296">(Apr 16 2021 at 14:26)</a>:</h4>
<p>oh hmm probably related to my old version of nixOS then</p>



<a name="234862316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862316">(Apr 16 2021 at 14:27)</a>:</h4>
<p>I don't know how to update glibc on nix :/</p>



<a name="234862522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862522">(Apr 16 2021 at 14:28)</a>:</h4>
<p>are you using a nix-shell somewhere in there? Toolchain on <code>nix</code> is pretty good at <code>rpath</code>-ing the necessary libraries into the binaries, but that only happens for the binaries that are built/linked by the toolchains provided by nix.</p>



<a name="234862613"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862613" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862613">(Apr 16 2021 at 14:28)</a>:</h4>
<p>I don't <em>think</em> so, should I be?</p>



<a name="234862639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862639">(Apr 16 2021 at 14:28)</a>:</h4>
<p>It isn't obvious to me if <code>libserde_derive</code> was built in your environment, or downloaded from somewhere.</p>



<a name="234862653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862653">(Apr 16 2021 at 14:29)</a>:</h4>
<p>libserde was built in my environment</p>



<a name="234862669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862669">(Apr 16 2021 at 14:29)</a>:</h4>
<p>these are dependencies of bootstrap itself</p>



<a name="234862772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862772">(Apr 16 2021 at 14:29)</a>:</h4>
<p>okay, and rustc is a downloaded stage0, isn't it?</p>



<a name="234862786"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862786" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862786">(Apr 16 2021 at 14:30)</a>:</h4>
<p>yes</p>



<a name="234862867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862867">(Apr 16 2021 at 14:30)</a>:</h4>
<div class="codehilite"><pre><span></span><code>&gt; /home/joshua/rust/build/x86_64-unknown-linux-gnu/stage0/bin/rustc --version
rustc 1.52.0-beta.3 (215738137 2021-04-06)
</code></pre></div>



<a name="234862874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234862874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234862874">(Apr 16 2021 at 14:30)</a>:</h4>
<p>so what might be happening here is that your <code>.so</code> was built with a newer <code>glibc</code> than what is linked into rustc stage0 at its load time.</p>



<a name="234863033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863033">(Apr 16 2021 at 14:31)</a>:</h4>
<p>you mean, like rustc is creating objects that use glibc 1.32 symbols?</p>



<a name="234863072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863072">(Apr 16 2021 at 14:31)</a>:</h4>
<p>Gimme 30 mins, I got a meeting to attend.</p>



<a name="234863104"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863104" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863104">(Apr 16 2021 at 14:31)</a>:</h4>
<p>I can advise you, but you can try nuking your entire <code>build/</code> and retrying from scratch?</p>



<a name="234863114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863114">(Apr 16 2021 at 14:31)</a>:</h4>
<p>I'm happy to install a newer glibc, I just don't know how</p>



<a name="234863122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863122">(Apr 16 2021 at 14:31)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F/near/234863104">said</a>:</p>
<blockquote>
<p>I can advise you, but you can try nuking your entire <code>build/</code> and retrying from scratch?</p>
</blockquote>
<p>sure</p>



<a name="234863491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863491">(Apr 16 2021 at 14:33)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F/near/234863104">said</a>:</p>
<blockquote>
<p>I can advise you, but you can try nuking your entire <code>build/</code> and retrying from scratch?</p>
</blockquote>
<p>that gives me a different error <span aria-label="laughing" class="emoji emoji-1f606" role="img" title="laughing">:laughing:</span></p>
<div class="codehilite"><pre><span></span><code>&gt; ./x.py --help
FileNotFoundError: [Errno 2] No such file or directory: &#39;/home/joshua/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo&#39;
&gt; file /home/joshua/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo
/home/joshua/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, with debug_info, not stripped
&gt; ldd /home/joshua/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo
    linux-vdso.so.1 (0x00007fff0cfa0000)
    libgcc_s.so.1 =&gt; /nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/libgcc_s.so.1 (0x00007f225a93b000)
    librt.so.1 =&gt; /nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/librt.so.1 (0x00007f225a931000)
    libpthread.so.0 =&gt; /nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/libpthread.so.0 (0x00007f225a910000)
    libm.so.6 =&gt; /nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/libm.so.6 (0x00007f225a7d0000)
    libdl.so.2 =&gt; /nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/libdl.so.2 (0x00007f225a7cb000)
    libc.so.6 =&gt; /nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/libc.so.6 (0x00007f225a60c000)
    /lib64/ld-linux-x86-64.so.2 =&gt; /nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib64/ld-linux-x86-64.so.2 (0x00007f225b9d3000)
</code></pre></div>



<a name="234863801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863801">(Apr 16 2021 at 14:35)</a>:</h4>
<p>This sounds like the <code>nixos</code> detection in bootstrap.py did not trigger and it didn't patch your stage0 artifacts.</p>



<a name="234863917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863917">(Apr 16 2021 at 14:36)</a>:</h4>
<p>hmm it did <em>something</em></p>
<div class="codehilite"><pre><span></span><code>info: you seem to be running NixOS. Attempting to patch /home/joshua/rust/build/x86_64-unknown-linux-gnu/ci-rustc/bin/cargo
stat: No such file or directory
warning: failed to call patchelf: Command &#39;[&#39;/home/joshua/rust/build/.nix-deps/bin/patchelf&#39;, &#39;--set-rpath&#39;, &#39;$ORIGIN/../lib:/nix/store/cl4qhnp02xg2mq8x8v8ms70v4x9rmp8p-rust-stage0-dependencies/lib&#39;, &#39;--set-interpreter&#39;, &#39;/nix/store/9rabxvqbv0vgjmydiv59wkz768b5fmbc-glibc-2.30/lib/ld-linux-x86-64.so.2&#39;, &#39;/home/joshua/rust/build/x86_64-unknown-linux-gnu/ci-rustc/bin/cargo&#39;]&#39; returned non-zero exit status 1.
</code></pre></div>



<a name="234863959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234863959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234863959">(Apr 16 2021 at 14:36)</a>:</h4>
<p>err uhh</p>
<div class="codehilite"><pre><span></span><code>info: you seem to be running NixOS. Attempting to patch /home/joshua/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo
</code></pre></div>
<p>is probably more relevant, that one succeeded</p>



<a name="234864097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234864097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234864097">(Apr 16 2021 at 14:37)</a>:</h4>
<p>just for my sanity I'm going to turn off download-rustc for now and see if it helps</p>



<a name="234864140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234864140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234864140">(Apr 16 2021 at 14:37)</a>:</h4>
<p>it does not :(</p>



<a name="234864245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234864245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234864245">(Apr 16 2021 at 14:38)</a>:</h4>
<p>although I wiped build/ again and now cargo can run <span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span> so I guess that's good</p>



<a name="234864251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234864251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234864251">(Apr 16 2021 at 14:38)</a>:</h4>
<p>back to the ICE</p>



<a name="234865518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234865518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234865518">(Apr 16 2021 at 14:46)</a>:</h4>
<p>So what's happening here is that gcc you run is trying to link things against a newer glibc than what was patched into your stage0 cargo/rustc</p>



<a name="234865554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234865554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234865554">(Apr 16 2021 at 14:46)</a>:</h4>
<p>I think that pretty much means there's some inconsistency in your <code>nixpkgs</code> channel.</p>



<a name="234866979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234866979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234866979">(Apr 16 2021 at 14:55)</a>:</h4>
<p>Just wanted to mention, I also got the <code>crate21</code> error yesterday. I usually assume errors like that are due to updating git and the metadata format changes.</p>



<a name="234870440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234870440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234870440">(Apr 16 2021 at 15:09)</a>:</h4>
<p>First things first, <span class="user-mention" data-user-id="232545">@Joshua Nelson</span> is it <code>origin/master</code> that you have checked out? Can you run <code>nix-channel --list</code>, <code>sudo nix-channel --list</code> and <code>nix-shell -p nix-info --run "nix-info"</code>?</p>



<a name="234872197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234872197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234872197">(Apr 16 2021 at 15:18)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F/near/234870440">said</a>:</p>
<blockquote>
<p>First things first, <span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> is it <code>origin/master</code> that you have checked out? Can you run <code>nix-channel --list</code>, <code>sudo nix-channel --list</code> and <code>nix-shell -p nix-info --run "nix-info"</code>?</p>
</blockquote>
<div class="codehilite"><pre><span></span><code>&gt; git log --oneline
3833636446b (HEAD -&gt; master, origin/master, origin/HEAD) Auto merge of #84230 - cuviper:llvm-12, r=nikic
&gt; nix-channel --list
nixos https://nixos.org/channels/nixos-unstable
nixos-20.09 https://nixos.org/channels/nixos-20.09
&gt; nix-shell -p nix-info --run nix-info
system: &quot;x86_64-linux&quot;, multi-user?: yes, version: nix-env (Nix) 2.3.3, channels(eddy): &quot;nixos-21.05pre279012.ad47284f8b0, nixpkgs-21.05pre278688.c0e88185200&quot;, channels(joshua): &quot;nixos-21.05pre276515.1f77a4c8c74, nixos-20.09-20.09.3505.12d9950bf47&quot;, channels(vn-ki): &quot;&quot;, channels(root): &quot;nixos-20.09pre218613.ae6bdcc5358&quot;, nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
</code></pre></div>
<p>I don't have admin priviledges on this server.</p>



<a name="234872284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234872284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234872284">(Apr 16 2021 at 15:18)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120518">Eric Huss</span> <a href="#narrow/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F/near/234866979">said</a>:</p>
<blockquote>
<p>Just wanted to mention, I also got the <code>crate21</code> error yesterday. I usually assume errors like that are due to updating git and the metadata format changes.</p>
</blockquote>
<p>how did you fix it?</p>



<a name="234872800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234872800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234872800">(Apr 16 2021 at 15:22)</a>:</h4>
<p>So the issue I think is that your user's nixpkgs channel is different from the system one and AFAICT you're pulling <code>gcc</code> from the system-wide rather than your users channel.</p>
<p>So the glibc that gets patched in is coming from the nix channel that your user has set up, and the <code>gcc</code> is linking against the system-wide channel's (root's) glibc, which is newer than your local one.</p>



<a name="234872833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234872833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234872833">(Apr 16 2021 at 15:22)</a>:</h4>
<p>Try this:</p>



<a name="234872931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234872931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234872931">(Apr 16 2021 at 15:22)</a>:</h4>
<div class="codehilite"><pre><span></span><code>rm -rf build/
nix-shell --keep NIX_PATH -p gcc9 binutils cmake ninja openssl pkgconfig python39 git curl cacert patchelf nix --pure --run &#39;./x.py build --stage=1&#39;
</code></pre></div>
<p>Or somesuch command. This should ensure that the environment is consistent.</p>



<a name="234873402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873402">(Apr 16 2021 at 15:25)</a>:</h4>
<p>ok yes the nix-shell thing fixed it!</p>



<a name="234873414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873414">(Apr 16 2021 at 15:26)</a>:</h4>
<p>I didn't even have to remove the build directory :)</p>



<a name="234873531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873531">(Apr 16 2021 at 15:26)</a>:</h4>
<p>is there a way to make that permanent?</p>



<a name="234873575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873575">(Apr 16 2021 at 15:27)</a>:</h4>
<p>Consider not having any user-specific channels specified so that the system wide is always used for your user.</p>



<a name="234873618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873618">(Apr 16 2021 at 15:27)</a>:</h4>
<p>the system wide channel has an ancient version of rustup that doesn't properly depend on zlib :/</p>



<a name="234873655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873655">(Apr 16 2021 at 15:27)</a>:</h4>
<p><a href="https://github.com/NixOS/nixpkgs/issues/91314">https://github.com/NixOS/nixpkgs/issues/91314</a></p>



<a name="234873819"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873819" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873819">(Apr 16 2021 at 15:28)</a>:</h4>
<p>this looks like a shared system, but unifying the channels in either direction is a possible option.</p>



<a name="234873940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873940">(Apr 16 2021 at 15:29)</a>:</h4>
<p>If you can't remove/downgrade the user-specific channels, consider bumping the root's ones.</p>



<a name="234873965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873965">(Apr 16 2021 at 15:29)</a>:</h4>
<p>I need to talk to <span class="user-mention" data-user-id="124288">@oli</span> about that I think</p>



<a name="234873989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234873989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234873989">(Apr 16 2021 at 15:29)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F/near/234872284">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="120518">Eric Huss</span> <a href="#narrow/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F/near/234866979">said</a>:</p>
<blockquote>
<p>Just wanted to mention, I also got the <code>crate21</code> error yesterday. I usually assume errors like that are due to updating git and the metadata format changes.</p>
</blockquote>
<p>how did you fix it?</p>
</blockquote>
<p>I don't remember for sure, but probably <code>x.py clean</code>.</p>



<a name="234874053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234874053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234874053">(Apr 16 2021 at 15:30)</a>:</h4>
<p>alternative is to set up a <code>shell.nix</code> file in your checkout, then you can just type <code>nix-shell</code> before developing and it'll set up the environment for you.</p>



<a name="234874511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234874511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234874511">(Apr 16 2021 at 15:32)</a>:</h4>
<p>Something like </p>
<div class="codehilite"><pre><span></span><code>{ pkgs ? import &lt;nixpkgs&gt; {}
}:
pkgs.mkShell {
  nativeBuildInputs = with pkgs; [
    gcc9 binutils cmake ninja openssl pkgconfig python39 git curl cacert patchelf nix psutils
  ];
}
</code></pre></div>
<p>I suppose.</p>



<a name="234875577"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/234875577" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#234875577">(Apr 16 2021 at 15:38)</a>:</h4>
<p>Sorry can't help you on this until July. shell.nix sounds like the right way forward until we get an OS bump</p>



<a name="236069651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236069651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236069651">(Apr 25 2021 at 14:36)</a>:</h4>
<p><span class="user-mention silent" data-user-id="123586">nagisa</span> <a href="#narrow/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F/near/234874511">said</a>:</p>
<blockquote>
<p>Something like </p>
<div class="codehilite"><pre><span></span><code>{ pkgs ? import &lt;nixpkgs&gt; {}
}:
pkgs.mkShell {
  nativeBuildInputs = with pkgs; [
    gcc9 binutils cmake ninja openssl pkgconfig python39 git curl cacert patchelf nix psutils
  ];
}
</code></pre></div>
<p>I suppose.</p>
</blockquote>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> I tried this and it gave an error:</p>
<div class="codehilite"><pre><span></span><code>error: attempt to call something which is not a function but a set, at /home/joshua/shell.nix:130:1
</code></pre></div>
<p>line 130 is <code>pkgs.mkShell {</code></p>



<a name="236069941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236069941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236069941">(Apr 25 2021 at 14:42)</a>:</h4>
<p>How come you have 130 lines? This should be a stand-alone file.</p>



<a name="236069956"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236069956" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236069956">(Apr 25 2021 at 14:42)</a>:</h4>
<p>... yeah it's probably easier at this point to just start over from scratch</p>



<a name="236069972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236069972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236069972">(Apr 25 2021 at 14:43)</a>:</h4>
<p>I mean, you probably do want to have your shells specific to each thing you use them for.</p>



<a name="236069977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236069977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236069977">(Apr 25 2021 at 14:43)</a>:</h4>
<p>the other 130 lines are a <code>config.toml</code> that gets set automatically</p>



<a name="236070024"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236070024" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236070024">(Apr 25 2021 at 14:44)</a>:</h4>
<p>I have no idea what's in your shell.nix, so you'll know better how to adjust it.</p>



<a name="236070038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236070038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236070038">(Apr 25 2021 at 14:44)</a>:</h4>
<p>ok yes this works fine when it's in its own file</p>



<a name="236071529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236071529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236071529">(Apr 25 2021 at 15:03)</a>:</h4>
<p>this shell.nix is working well for me :) thank you so much for the help!</p>
<div class="codehilite" data-code-language="Nix"><pre><span></span><code><span class="p">{</span> pkgs <span class="o">?</span> <span class="nb">import</span> <span class="l">&lt;nixpkgs&gt;</span> <span class="p">{}</span>
<span class="p">}:</span>

<span class="c1"># This file contains a development shell for working on rustc.</span>
<span class="k">let</span>
  <span class="c1"># Build configuration for rust-lang/rust. Based on `config.toml.example` from</span>
  <span class="c1"># `1bd30ce2aac40c7698aa4a1b9520aa649ff2d1c5`.</span>
  <span class="ss">config =</span> pkgs<span class="o">.</span>writeText <span class="s2">"rustc-config"</span> <span class="s1">''</span>
<span class="s1">    profile = "tools"</span>
<span class="s1">    changelog-seen = 2</span>

<span class="s1">    [llvm]</span>
<span class="s1">    assertions = true</span>

<span class="s1">    [build]</span>
<span class="s1">    compiler-docs = true</span>

<span class="s1">    # The path to (or name of) the GDB executable to use. This is only used for</span>
<span class="s1">    # executing the debuginfo test suite.</span>
<span class="s1">    gdb = "</span><span class="si">${</span>pkgs<span class="o">.</span>gdb<span class="si">}</span><span class="s1">/bin/gdb"</span>
<span class="s1">    python = "</span><span class="si">${</span>pkgs<span class="o">.</span>python3Full<span class="si">}</span><span class="s1">/bin/python"</span>

<span class="s1">    [rust]</span>
<span class="s1">    debug = true</span>
<span class="s1">    incremental = true</span>
<span class="s1">    deny-warnings = false</span>

<span class="s1">    # Indicates whether some LLVM tools, like llvm-objdump, will be made available in the</span>
<span class="s1">    # sysroot.</span>
<span class="s1">    llvm-tools = true</span>

<span class="s1">    # Print backtrace on internal compiler errors during bootstrap</span>
<span class="s1">    backtrace-on-ice = true</span>
<span class="s1">  ''</span><span class="p">;</span>

  <span class="ss">ripgrepConfig =</span>
    <span class="k">let</span>
      <span class="c1"># Files that are ignored by ripgrep when searching.</span>
      <span class="ss">ignoreFile =</span> pkgs<span class="o">.</span>writeText <span class="s2">"rustc-rgignore"</span> <span class="s1">''</span>
<span class="s1">        configure</span>
<span class="s1">        config.toml.example</span>
<span class="s1">        x.py</span>
<span class="s1">        LICENSE-MIT</span>
<span class="s1">        LICENSE-APACHE</span>
<span class="s1">        COPYRIGHT</span>
<span class="s1">        **/*.txt</span>
<span class="s1">        **/*.toml</span>
<span class="s1">        **/*.yml</span>
<span class="s1">        **/*.nix</span>
<span class="s1">        *.md</span>
<span class="s1">        src/ci</span>
<span class="s1">        src/etc/</span>
<span class="s1">        src/llvm-emscripten/</span>
<span class="s1">        src/llvm-project/</span>
<span class="s1">        src/rtstartup/</span>
<span class="s1">        src/rustllvm/</span>
<span class="s1">        src/stdsimd/</span>
<span class="s1">        src/tools/rls/rls-analysis/test_data/</span>
<span class="s1">      ''</span><span class="p">;</span>
    <span class="k">in</span>
    pkgs<span class="o">.</span>writeText <span class="s2">"rustc-ripgreprc"</span> <span class="s2">"--ignore-file=</span><span class="si">${</span>ignoreFile<span class="si">}</span><span class="s2">"</span><span class="p">;</span>
<span class="k">in</span>
pkgs<span class="o">.</span>mkShell <span class="p">{</span>
  <span class="ss">name =</span> <span class="s2">"rustc"</span><span class="p">;</span>
  <span class="ss">nativeBuildInputs =</span> <span class="k">with</span> pkgs<span class="p">;</span> <span class="p">[</span>
    gcc9 binutils cmake ninja openssl pkgconfig python39 git curl cacert patchelf nix psutils
  <span class="p">];</span>
  <span class="ss">RIPGREP_CONFIG_PATH =</span> ripgrepConfig<span class="p">;</span>
  <span class="ss">RUST_BOOTSTRAP_CONFIG =</span> config<span class="p">;</span>
<span class="p">}</span>
</code></pre></div>



<a name="236112015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236112015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236112015">(Apr 26 2021 at 02:25)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232545">Joshua Nelson</span> <a href="#narrow/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F/near/234873402">said</a>:</p>
<blockquote>
<p>ok yes the nix-shell thing fixed it!</p>
</blockquote>
<p>apparently it has now broken again <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span> </p>
<div class="codehilite"><pre><span></span><code>FileNotFoundError: [Errno 2] No such file or directory: &#39;/home/joshua/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo&#39;
</code></pre></div>



<a name="236112127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/bootstrap%20fails%20to%20build%3F%3F/near/236112127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/bootstrap.20fails.20to.20build.3F.3F.html#236112127">(Apr 26 2021 at 02:27)</a>:</h4>
<p>ok apparently the issue is if I ever run <code>x.py build</code> <em>outside</em> of the shell by the accident, cargo will dynamically link to the wrong glibc. the fix is <code>rm -r build</code> and then to re-enter the shell</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>